//
//  XBZuiXinCellTwo.m
//  Home
//
//  Created by 陈明茂 on 16/4/4.
//  Copyright © 2016年 iOS. All rights reserved.
//

#import "XBZuiXinCellTwo.h"

@interface XBZuiXinCellTwo ()<UICollectionViewDataSource,UICollectionViewDelegate>

@property (weak, nonatomic) IBOutlet UICollectionView *collectionView;

@property (weak, nonatomic) IBOutlet UICollectionViewFlowLayout *layout;

@end

@implementation XBZuiXinCellTwo

- (void)awakeFromNib{
    
    self.collectionView.delegate = self;
    self.collectionView.dataSource =self;
    self.layout.scrollDirection = UICollectionViewScrollDirectionHorizontal;
    self.collectionView.showsHorizontalScrollIndicator = NO;
    self.layout.itemSize = CGSizeMake(110, 140);
    
}


#pragma mark - collectionView的代理方法

- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section{
    
    return 6;
    
}

- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath{
    
    UICollectionViewCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"two_collection" forIndexPath:indexPath];
    
    return cell;
}

- (void)setFrame:(CGRect)frame
{
    frame.size.height -= 8;
    [super setFrame:frame];
}

@end
